package io;

import java.io.*;

public class PWDemo2 {
    public static void main(String[] args) throws FileNotFoundException, UnsupportedEncodingException {





        FileOutputStream fos = new FileOutputStream("pw2.txt");

        OutputStreamWriter osw = new OutputStreamWriter(fos,"UTF-8");

        BufferedWriter bw = new BufferedWriter(osw);

        PrintWriter pw = new PrintWriter(bw);

        pw.println("你好！");

        pw.println("再见！");

        System.out.println("写出完毕！");
        pw.close();











//        FileOutputStream fos = new FileOutputStream("iiiii.txt");
//
//        OutputStreamWriter osw = new OutputStreamWriter(fos,"UTF-8");
//
//        BufferedWriter bw = new BufferedWriter(osw);
//
//        PrintWriter pw = new PrintWriter(bw);
//
//        pw.println("圣诞节会计法");
//        pw.println("方式就是地方建瓯IE");
//
//        System.out.println("写出完毕");
//
//        pw.close();
















    }
}
